home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C++ / Applications / PICSee Dust 1.01 / Quaternary Source / assert_mac.c < prev    next >
C/C++ Source or Header  |  1995-06-24  |  410b  |  23 lines

  1. #include "assert_mac.h"
  2.  
  3. #ifndef NDEBUG
  4.  
  5. void _ASSERT(char *msg)
  6. {
  7.     Str255 debugMsg;
  8.     short msgLength, i;
  9.  
  10.     /* Step through and find length of c-string msg */    
  11.     msgLength = 0;
  12.     while (msg[msgLength++] != 0) {}
  13.  
  14.     /* Copy msg to pascal msg string */
  15.     for (i = 0; i < msgLength; i++)
  16.         debugMsg[i+1] = msg[i];
  17.     debugMsg[0] = msgLength;
  18.  
  19.     /* Call debugger */
  20.     DebugStr(debugMsg);
  21. } // END _Assert
  22.  
  23. #endif // NDEBUG